package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MessageOrgainze generated by hbm2java
 */
@Entity
@Table(name = "message_orgainze")
public class MessageOrgainze implements java.io.Serializable {

	private Long id;
	private Organize organize;
	private TrainNoticePart trainNoticePart;
	private int state;
	private Integer numberPeople;
	private Date createDate;
	private Integer organizeType;

	public MessageOrgainze() {
	}

	public MessageOrgainze(int state) {
		this.state = state;
	}

	public MessageOrgainze(Organize organize, TrainNoticePart trainNoticePart,
			int state, Integer numberPeople, Date createDate,
			Integer organizeType) {
		this.organize = organize;
		this.trainNoticePart = trainNoticePart;
		this.state = state;
		this.numberPeople = numberPeople;
		this.createDate = createDate;
		this.organizeType = organizeType;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORGANIZE")
	public Organize getOrganize() {
		return this.organize;
	}

	public void setOrganize(Organize organize) {
		this.organize = organize;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TRAIN_ID")
	public TrainNoticePart getTrainNoticePart() {
		return this.trainNoticePart;
	}

	public void setTrainNoticePart(TrainNoticePart trainNoticePart) {
		this.trainNoticePart = trainNoticePart;
	}

	@Column(name = "STATE", nullable = false)
	public int getState() {
		return this.state;
	}

	public void setState(int state) {
		this.state = state;
	}

	@Column(name = "NUMBER_PEOPLE")
	public Integer getNumberPeople() {
		return this.numberPeople;
	}

	public void setNumberPeople(Integer numberPeople) {
		this.numberPeople = numberPeople;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "ORGANIZE_TYPE")
	public Integer getOrganizeType() {
		return this.organizeType;
	}

	public void setOrganizeType(Integer organizeType) {
		this.organizeType = organizeType;
	}

}
